< previous page page_39 next page >

Page 39
EXERCISE
1. Click once anywhere on the form. This gives the form focus. Focus refers to the currently selected object. Youll know whether an object is selected because it will have resizing handles all along the outside border of its window and the title of the window will be highlighted.
2. Go to the Properties window and find the Caption property. This property will display the text you type into it in the title bar of the form.
3. Change the Caption property to Employee Information.
4. Notice that the caption of the form has now changed.
5. Change the WindowState property from 0-Normal to 2-Maximized. By changing this property, you affect the behavior of the form. When you run the program, the form should now cover the entire screen.
6. Find the Name property and change it to frmEmployee. This is the name youll use to refer to this form when you write source code. Its recommended that every form be prefixed with the letters frm. In fact, all the controls you add to the form will have prefixes that indicate their control type. This will help you identify the types of controls in your source code without having to look to see what the controls are on the form. You might want to look at the programming standards I have outlined in Appendix A of this book.
NOTE
Some properties are available only at runtime. These properties will not show up in the Properties window. Additionally, some properties are read-only or write-only at runtime. Check the online Help for a description of each property and when it may be set.
analysis.gifAs you can see, we have just changed the look of this form by changing the Caption property. If you change the WindowState property and then run the form, youll see that the form now covers the entire screen. This is what properties are forto customize the look or behavior of an object.

 
< previous page page_39 next page >

If you like this book, buy it!